package com.wnhoo.smartfishtank.ble;

import java.util.HashMap;
import java.util.UUID;

public class BleGattAttributes {
    public static String ALERT_LEVEL_CHARACTERISTIC;
    public static String CLIENT_CHARACTERISTIC_CONFIG;
    public static String FINDME_SERVICE;
    public static String FIND_ME_CHARACTERISTIC;
    public static String IMMIDIATE_ALERT_SERVICE = "00001802-0000-1000-8000-00805f9b34fb";
    public static String LINK_LOSS_SERVICE;
    public static final UUID UUID_ALERT_LEVEL_CHARACTERISTIC;
    public static final UUID UUID_CLIENT_CHARACTERISTIC_CONFIG;
    public static final UUID UUID_FINDME_SERVICE;
    public static final UUID UUID_FIND_ME_CHARACTERISTIC;
    public static final UUID UUID_IMMIDIATE_ALERT_SERVICEL;
    public static final UUID UUID_LINK_LOSS_SERVICE;
    private static HashMap<String, String> attributes;

    static {
        FINDME_SERVICE = "0000ffe0-0000-1000-8000-00805f9b34fb";
        LINK_LOSS_SERVICE = "00001803-0000-1000-8000-00805f9b34fb";
        CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
        ALERT_LEVEL_CHARACTERISTIC = "00002a06-0000-1000-8000-00805f9b34fb";
        FIND_ME_CHARACTERISTIC = "0000ffe1-0000-1000-8000-00805f9b34fb";
        UUID_IMMIDIATE_ALERT_SERVICEL = UUID.fromString(IMMIDIATE_ALERT_SERVICE);
        UUID_FINDME_SERVICE = UUID.fromString(FINDME_SERVICE);
        UUID_LINK_LOSS_SERVICE = UUID.fromString(LINK_LOSS_SERVICE);
        UUID_CLIENT_CHARACTERISTIC_CONFIG = UUID.fromString(CLIENT_CHARACTERISTIC_CONFIG);
        UUID_ALERT_LEVEL_CHARACTERISTIC = UUID.fromString(ALERT_LEVEL_CHARACTERISTIC);
        UUID_FIND_ME_CHARACTERISTIC = UUID.fromString(FIND_ME_CHARACTERISTIC);
        attributes = new HashMap();
        attributes.put("IMMIDIATE_ALERT_SERVICE", "Immidiate Alert Service");
        attributes.put("FINDME_SERVICE", "Find Me Service");
        attributes.put("LINK_LOSSS_ERVICE", "Link Loss Service");
        attributes.put(ALERT_LEVEL_CHARACTERISTIC, "Alert Level");
        attributes.put(FIND_ME_CHARACTERISTIC, "Find Me");
    }

    public static String lookup(String paramString) {
        if (attributes.containsKey(paramString))
            return (String) attributes.get(paramString);
        return null;
    }

    public static String lookup1(String paramString1, String paramString2) {
        String str = (String) attributes.get(paramString1);
        if (str == null)
            return paramString2;
        return str;
    }
}